package jwr.ex4;

import java.util.Scanner;

public class ShiritoriMain {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int maxCnt,cnt=0;
		
		System.out.print("몇 명인지 입력해주세요.");
		maxCnt = sc.nextInt();
		Shiritori srt = new Shiritori(maxCnt);
		for(int i = 1; i<=maxCnt;i++){
			System.out.println("이름은?");
			srt.setNames(sc.next());
		}
		while(srt.check()){
			System.out.println(srt.getNames(cnt));
			if(++cnt == maxCnt){
				
			}
		}
		
	}

}
